import { Column, Entity } from "typeorm";
import { PublicEntity } from "@entities/public.entity";

@Entity({
    name: 'sys_dept',
    orderBy: {
        sort: 'DESC'
    }
})
export class DepartmentEntity extends PublicEntity {
    @Column({comment: '上级id'})
    pid: number

    @Column({comment: '名称', length: 50})
    name: string

    @Column({name: 'sub_count', comment: '名称', length: 50})
    subCount: string

    @Column({comment: '排序'})
    sort: number

    @Column({comment: '描述', length: 100})
    description: string

    @Column({name: 'is_delete', comment: '是否删除，（0.否，1.是）', select: false })
    isDelete: number

}
